Program calling system and method

ABSTRACT

A program calling system includes a memory, an interface establishing unit, a detecting unit, and a calling unit. The memory stores functions for PCB layout design. Each function corresponds to a path and a name, and can be accessed via the corresponding path and name. The interface establishing unit establishes a user interface. The user interface includes a first area for displaying the names of the functions. A one to one relationship exists between the names and the paths of the functions. The detecting unit detects whether a calling signal is generated, and obtains a name of a to-be-called function when the calling signal is generated. The calling unit responds to the calling signal to obtain a path of the to-be-called function according to the name of the to-be-called function and the one to one relationship, and call the to-be-called function according to the obtained path and name.

BACKGROUND

1. Technical Field

The present disclosure relates to printed circuit board (hereinafter“PCB”) layout design; and particularly to a program calling system andmethod for PCB layout design.

2. Description of Related Art

Current PCB layout design software uses complex function calls thatincludes both name and path of each function, thus the user needs toremember the names and the paths of the functions to call the functions.However, the path of each function is often too long, this isinconvenient.

Therefore, there is room for improvement in the art.

BRIEF DESCRIPTION OF THE DRAWINGS

Many aspects of the embodiments can be better understood with referencesto the following drawings. The components in the drawings are notnecessarily drawn to scale, the emphasis instead being placed uponclearly illustrating the principles of the embodiments. Moreover, in thedrawings, like reference numerals designate corresponding partsthroughout several views.

FIG. 1 is a block diagram of a program calling system for PCB layoutdesign in accordance with an exemplary embodiment, the program callingsystem having a user interface.

FIG. 2 is a schematic view of the user interface of the program callingsystem of FIG. 1.

FIG. 3 is a flowchart of a program calling method for PCB layout designin accordance with an exemplary embodiment.

DETAILED DESCRIPTION

The disclosure is illustrated by way of example and not by way oflimitation in the figures of the accompanying drawings in which likereferences indicate similar elements. It should be noted that referencesto “an” or “one” embodiment in this disclosure are not necessarily tothe same embodiment, and such references mean at least one.

Referring to FIGS. 1 and 2, a program calling system 100 for PCB layoutdesign includes a memory 110, an interface establishing unit 120, adetecting unit 130, a comparing unit 140, an adding unit 150, a callingunit 160, a deleting unit 170, and a closing unit 180.

The memory 110 is used for storing several functions for PCB layoutdesign such as for adjusting directions of letters to-be-printed on thePCB. Each function corresponds to a name and a path, and each functioncan be accessed via the corresponding name and path.

The interface establishing unit 120 is used for establishing a userinterface 10. The user interface 10 includes a first area 12 fordisplaying names of the functions, and a second area 11 for displayingpaths of the functions. A one to one relationship exists between thenames and the paths of the functions. That is, when the name of one ofthe functions in the first area 12 is selected, the corresponding pathof the function will be obtained according to the selected name of thefunction and the one to one relationship.

The detecting unit 130 is used for detecting whether a detecting signalis generated, and obtaining a name and path of a to-be-added functionwhen the detecting signal is generated. In the embodiment, the userinterface 10 includes an “Add” button 14. When the “Add” button 14 isselected, the detecting signal is generated.

The comparing unit 140 is used for responding to the detecting signal tocompare the name of the to-be-added function with the names of thefunctions displayed in the first area 12, to determine whether theto-be-added function exists in the first area 12. When it is determinedthat the to-be-added function does not exist in the first area 12, thecomparing unit 140 generates an adding signal to the adding unit 150.

The adding unit 150 is used for responding to the adding signal torespectively add the name and path of the to-be-added function into thefirst area 12 and the second area 11 of the user interface 10.

The detecting unit 130 is further used for detecting whether a callingsignal is generated, and obtaining a name of a to-be-called functionwhen the calling signal is generated. In the embodiment, the userinterface 10 includes a third area 13 for displaying the name of theto-be-called function and a “Call Function” button 16. When the “CallFunction” button 16 is selected, the calling signal is generated. Thedetecting unit 130 uses the function, displayed in the first area 12which name is selected, as the to-be-called function, and when the “CallFunction” button 16 is selected, and the name of the to-be-calledfunction is displayed in the third area 13.

The calling unit 160 is used for responding to the calling signal toobtain a path of the to-be-called function according to the name of theto-be-called function and the one to one relationship, and call theto-be-called function according to the obtained path and name of theto-be-called function. Therefore, the user need not remember the path ofthe to-be-called function to call the to-be-called function. Inaddition, when the “Call Function” button 16 is selected, the path ofthe to-be-called function displayed in the second area 11 ishighlighted.

The detecting unit 130 is further used for detecting whether a deletingsignal is generated, and obtaining a name of a to-be-deleted functionwhen the deleting signal is generated. In the embodiment, the userinterface 10 includes a “Delete” button 15. When the “Delete” button 15is selected, the deleting signal is generated. The detecting unit 130uses the function, displayed in the first area 12 which name isselected, as the to-be-deleted function.

The deleting unit 170 is used for responding to the deleting signal toobtain a path of the to-be-called function according to the name of theto-be-deleted function and the one to one relationship, and delete thename and path of to-be-deleted function from the first area 12 and thesecond area 11 of the user interface 10. In addition, when the “Delete”button 15 is selected, the path of the to-be-deleted function displayedin the second area 11 is highlighted.

The detecting unit 130 is further used for detecting whether a closingsignal is generated. In the embodiment, the user interface 10 includes a“Close” button 17. When the “Close” button 17 is selected, the closingsignal is generated. The closing unit 180 is used for responding to theclosing signal to close the user interface 10 and exit the programcalling system 100.

Referring to FIGS. 2 and 3, a program calling method is used for callingfunctions to design PCB layout. The functions may be stored in a memory.Each function corresponds to a name and a path, and each function can beaccessed via the corresponding name and path. The program calling methodincludes the following steps.

In step S802, establishing a user interface. In the embodiment, the userinterface 10 includes a first area 12 for displaying names of thefunctions, and a second area 11 for displaying paths of the functions. Aone to one relationship exists between the names and the paths of thefunctions. That is, when the name of one of the functions in the firstarea 12 is selected, the corresponding path of the function will beobtained according to the selected name of the function and the one toone relationship.

In step S804, detecting whether a detecting signal is generated. If thedetecting signal is generated, step S806 is implemented. If thedetecting signal is not generated, step S804 is implemented. In theembodiment, the user interface 10 further includes an “Add” button 14,and when the “Add” button 14 is selected, the detecting signal isgenerated.

In step S806, obtaining a name and path of a to-be-added function.

In step S808, determining whether the to-be-added function exists in theuser interface 10. If the to-be-added function does not exist in theuser interface 10, step S810 is implemented. If the to-be-added functionexists in the user interface 10, step S804 is implemented. In theembodiment, whether the to-be-added exists in the user interface isdetermined by comparing the name of the to-be-added function with thenames of the functions displayed in the first area 12.

In step S810, adding the name and path of the to-be-added functionrespectively into the first area 12 and the second area 11 of the userinterface 10.

In step S812, detecting whether a calling signal is generated. If thecalling signal is generated, step S814 is implemented. If the callingsignal is not generated, step S812 is implemented. In the embodiment,the user interface 10 further includes a “Call Function” button 16, andwhen the “Call Function” button 16 is selected, the calling signal isgenerated.

In step S814, obtaining a name of the to-be-called function and thenobtaining a path of the to-be-called function according to the name ofthe to-be-called function and the one to one relationship, and callingthe to-be-called function according to the obtained path and name of theto-be-called function. Therefore, the user need not remember the path ofthe to-be-called function to call the to-be-called function. In theembodiment, the user interface 10 further includes a third area 13. Thefunction, displayed in the first area 12 which name is selected, is usedas the to-be-called function, and when the “Call Function” button 16 isselected, the path of the to-be-called function displayed in the secondarea 11 is highlighted, and the name of the to-be-called function isdisplayed in the third area 13.

In step S816, detecting whether a deleting signal is generated. If thedeleting signal is generated, step S818 is implemented. If the deletingsignal is not generated, step S816 is implemented. In the embodiment,the user interface 10 further includes a “Delete” button 15, and whenthe “Delete” button 15 is selected, the deleting signal is generated.

In step S818, obtaining a name of a to-be-deleted function and obtaininga path of the to-be-deleted function according to the name of theto-be-deleted function and the one to one relationship, and delete thename and path of the to-be-deleted function from the first area 12 andthe second area 11 of the user interface 10. In the embodiment, thefunction, displayed in the first area 12 which name is selected, is usedas the to-be-deleted function, and when the “Delete” button 15 isselected, the path of the to-be-deleted function displayed in the secondarea 11 is highlighted.

In step S820, detecting whether a closing signal is generated. If theclosing signal is generated, step S822 is implemented. If the closingsignal is not generated, step S820 is implemented. In the embodiment,the user interface 10 further includes a “Close” button 17, and when the“Close” button 17 is selected, the closing signal is generated.

In step S822, closing the user interface 10.

It is to be understood, however, that even though information andadvantages of the present embodiments have been set forth in theforegoing description, together with details of the structures andfunctions of the present embodiments, the disclosure is illustrativeonly; and that changes may be made in detail, especially in matters ofshape, size, and arrangement of parts within the principles of thepresent embodiments to the full extent indicated by the broad generalmeaning of the terms in which the appended claims are expressed.

1. A program calling system used for PCB layout design, the programcalling system comprising: a memory adapted to store a plurality offunctions for PCB layout design, each function corresponding to a pathand a name, and capable of being accessed via the corresponding path andname; an interface establishing unit adapted to establish a userinterface, the user interface comprising a first area for displaying thenames of the function, and a one to one relationship existing betweenthe names and the paths of the functions; a detecting unit adapted todetect whether a calling signal is generated, and obtaining a name of ato-be-called function when the calling signal is generated; and acalling unit adapted to respond to the calling signal to obtain a pathof the to-be-called function according to the name of the to-be-calledfunction and the one to one relationship, and call the to-be-calledfunction according to the obtained path and name of the to-be-calledfunction.
 2. The program calling system according to claim 1, whereinthe detecting unit uses the function, displayed in the first area whichname is selected, as the to-be-called function.
 3. The program callingsystem according to claim 1, wherein the user interface furthercomprises a second area for displaying the paths of the functions, andthe path of the to-be-called function displayed in the second area ishighlighted when the calling signal is generated.
 4. The program callingsystem according to claim 1, wherein the user interface furthercomprises a third area; and the name of the to-be-called function isdisplayed in the third area when the calling signal is generated.
 5. Theprogram calling system according to claim 1, further comprising anadding unit, the detecting unit further adapted to detect whether adetecting signal is generated, and obtain a name and path of ato-be-added function when the detecting signal is generated; the addingunit adapted to respond to the detecting signal to add the name of theto-be-added function into the first area of the user interface.
 6. Theprogram calling system according to claim 5, wherein the user interfacefurther comprises a second area for displaying the paths of thefunctions, the adding unit further adapted to respond to the detectingsignal to add the path of the to-be-added function into the second areaof the user interface.
 7. The program calling system according to claim5, further comprising a comparing unit, the comparing unit adapted torespond to the detecting signal to determine whether the to-be-addedfunction exists in the user interface, and generate an adding signalwhen it is determined that the to-be-added function does not exist inthe first area; the adding unit adapted to respond to the adding signalto add the name of the to-be added function into the first area of theuser interface.
 8. The program calling system according to claim 7,wherein the comparing unit determines whether the to-be-added functionexists in the user interface by comparing the name of the to-be-addedfunction with the names of the functions displayed in the first area. 9.The program calling system according to claim 1, further comprising adeleting unit, the detecting unit further adapted to detect whether adeleting signal is generated, and obtain a name of a to-be-deletedfunction when the deleting signal is generated; the deleting unitadapted to delete the name of the to-be-added function from the firstarea of the user interface.
 10. The program calling system according toclaim 9, wherein the user interface further comprises a second area fordisplaying the paths of the functions, the deleting unit further adaptedto respond to the deleting signal to delete the path of theto-be-deleted function from the second area of the user interface. 11.The program calling system according to claim 9, wherein the detectingunit uses the function, displayed in the first area which name isselected, as the to-be-deleted function.
 12. The program calling systemaccording to claim 9, wherein the user interface further comprises asecond area for displaying the paths of the functions, and the path ofthe to-be-deleted function displayed in the second area is highlightedwhen the deleting signal is generated.
 13. The program calling systemaccording to claim 1, further comprising a closing unit, the detectingunit further adapted to detect whether a closing signal is generated;the closing unit adapted to respond to the closing signal to close theuser interface and exit the program calling system.
 14. A programcalling method for calling functions to design PCB layout, each functioncorresponding to a path and a name, and each function capable of beingaccessed via the corresponding path and name, the program calling methodcomprising: establishing a user interface, the user interface comprisinga first area for displaying the names of the functions, and a one to onerelationship existing between the names and the paths of the functions;detecting whether a calling signal is generated; and if the callingsignal is generated, obtaining a name of a to-be-called function andthen obtaining a path of the to-be-called function according to the nameof the to-be-called function and the one to one relationship, andcalling the to-be-called function according to the obtained path andname of the to-be-called function.
 15. The program calling methodaccording to claim 14, wherein the function, displayed in the first areawhich name is selected, is used as the to-be-called function.
 16. Theprogram calling method according to claim 14, wherein the user interfacefurther comprises a second area for displaying the paths of thefunctions, and the path of the to-be-called displayed in the second areais highlighted when the calling signal is generated.
 17. The programcalling method according to claim 14, further comprising: detectingwhether a detecting signal is generated; if the detecting signal isgenerated, obtaining a name and path of a to-be-added function;determining whether the to-be-added function exists in the userinterface; and if the to-be-added function does not exist in the userinterface, adding the name of the to-be-added function into the firstarea.
 18. The program calling method according to claim 14, furthercomprising: detecting whether a deleting signal is generated; and if thedeleting signal is generated, obtaining a name of a to-be-deletedfunction and then obtaining the path of the to-be-deleted functionaccording to the name of the to-be-deleted function and the one to onerelationship, and delete the name of the to-be-deleted function from thefirst area.
 19. The program calling method according to claim 18,wherein the function, displayed in the first area which name isselected, is used as the to-be-deleted function.
 20. The program callingmethod according to claim 14, further comprising: detecting whether aclosing signal is generated; and if the closing signal is generated,closing the user interface.